<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{course_desc}</title>
<link rel="shortcut icon" href="{dir_image}favicon.ico">
<link rel="stylesheet" type="text/css" href="{dir_css}Global.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}Popup.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}Students.css" />
<link rel="stylesheet" type="text/css" href="{dir_css}jquery.mCustomScrollbar.css" />

<script type="text/javascript" src="{dir_js}jquery.min.js"></script>
<script type="text/javascript" src="{dir_js}jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript">
	function activateNewSemester() {
		var code  	= $('#code').val();
		var input 	= $('#input_code').val();
		var sem_sem = $('#sem_sem').val();
		var nssy 	= $('#nssy').val();
		if ( code != input ) {
			$('#input_code_warning').show();
			return false;
		}
		else {
			$.post('request.php', {AJAXPost:'ActivateNextSemesterSY', sem_sem: sem_sem, nssy: nssy}, function() {
				alert('New semester/school year successully activated.');
				parent.window.location.href = parent.window.location.href;
			});
		}
	}
</script>
</head>
<body class="print-preview-subject">
	<input type="hidden" id="code" value="{code}"/>
	<input type="hidden" id="sem_sem" value="{sem_sem}"/>
	<input type="hidden" id="nssy" value="{nssy}"/>
	<div class="semester-sy">
		<div class="label">Current Semester/SY</div>
		<div class="value">{sy_year}</div>
	</div>
	<div class="next-semester">
		<div class="label">Activate Next Semester</div>
		<div class="label-2">{next_sem}</div>
		<div class="catcha">{catcha}</div>
		<div class="input">
			<input type="text" id="input_code" name="input_code" class="text-input" maxlength="8"/>
			<input type="button" name="subButton" class="submit-input" value="Activate" onclick="activateNewSemester()"/>
			<div id="input_code_warning" class="display-none"><span class="required-field">Invalid Code Input</span></div>
		</div>
	</div>
</body>
</html>